home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs55.d81
/
ascipr.seq
< prev
next >
Wrap
Text File
|
2009-10-10
|
3KB
|
167 lines
/***** ═ODIFIED ╨╥╔╬╘.├ ╨ROGRAM *****
╧RIGINAL FROM ├-╨OWER ╙OURCE DISK
═ODIFIED TO CORRECT SPECIAL CHARACTERS
BY: ╒NIDENTIFIED(?) ╤╠╔╬╦ UPLOADER
═ODIFIED TO OUTPUT TO A STANDARD ┴╙├╔╔
PRINTER BY: ═. ╘UCKER ┬RAWNER (03-14-88)
*************************************/
#INCLUDE <STDIO.H>
#DEFINE ╬┴═┼╙╔┌┼ 20
#DEFINE ┼╥╥ 1
#DEFINE ═┴╪╠╔╬┼ 81
#DEFINE ═┴╥╟╔╬1 3
#DEFINE ═┴╥╟╔╬2 3
#DEFINE ╨┴╟┼╠┼╬ 66
#DEFINE ┬╧╘╘╧═ 66
MAIN (ARGC, ARGV)
UNSIGNED ARGC;
CHAR **ARGV;
█
╞╔╠┼ FIN;
IF (ARGC == 1)
█
PRINTF ("├ORRECT SYNTAX: ╨╥╔╬╘ FILENAME FILENAME...\N");
EXIT();
▌
ELSE
FCLOSE(STDOUT);
IF (OPEN(6,4,7," ") == ╬╒╠╠ FERROR())
█
PRINTF("├HECK ╨RINTER...UNABLE TO OPEN FILE\N");
EXIT();
▌
WHILE (--ARGC)
█
IF ((FIN = FOPEN(*++ARGV, "R")) == ╬╒╠╠ FERROR())
█
PRINTF ("├ANT'T OPEN %S\N", *ARGV);
EXIT();
▌
ELSE
█
FPRINT (*ARGV, FIN);
FCLOSE (FIN);
▌
▌
FCLOSE (6);
▌
FPRINT (NAME, FIN)
CHAR *NAME,C;
╞╔╠┼ FIN;
█
CHAR LINE[═┴╪╠╔╬┼];
UNSIGNED PAGENO, LINENO, COUNTER;
PAGENO = 0;
LINENO = 0;
WHILE (FGETS (LINE, ═┴╪╠╔╬┼, FIN) != ╬╒╠╠)
█
IF (LINENO == 0)
█
SKIP (═┴╥╟╔╬1);
PAGENO++;
HEAD (NAME, PAGENO);
SKIP (═┴╥╟╔╬2);
LINENO = ═┴╥╟╔╬1 + ═┴╥╟╔╬2 + 1;
▌
COUNTER=0;
WHILE (LINE[COUNTER]!=0)
█
SWITCH(LINE[COUNTER])
█
CASE 175:
█
FPUTC('\176',6);
BREAK;
▌
CASE 219:
█
FPUTC('\173',6);
BREAK;
▌
CASE 221:
█
FPUTC('\175',6);
BREAK;
▌
CASE 223:
█
FPUTC('\174',6);
BREAK;
▌
CASE 164:
█
FPUTC('\137',6);
BREAK;
▌
DEFAULT:
█
C = LINE[COUNTER];
IF (ISUPPER(C))
█
C = UPASCII(C);
GOTO PRINT;
▌
IF (ISLOWER(C))
█
C = LOASCII(C);
GOTO PRINT;
▌
PRINT:
FPUTC(C,6);
▌
▌
COUNTER++;
▌
LINENO++;
IF (LINENO >= ┬╧╘╘╧═)
█
SKIP (╨┴╟┼╠┼╬ - LINENO);
LINENO = 0;
▌
▌
IF (LINENO > 0)
SKIP (╨┴╟┼╠┼╬ - LINENO);
▌
SKIP (N)
█
WHILE (N--)
█
FPUTC ('\N',6);
▌
▌
HEAD (NAME, PAGENO)
CHAR *NAME;
INT PAGENO;
█
FPRINTF (6,"%-60S\120\141\147\145 # %U\N",NAME, PAGENO);
▌
UPASCII(C)
CHAR C;
█
C=(C-128);
RETURN(C);
▌
LOASCII(C)
CHAR C;
█
C=(C+32);
RETURN(C);
▌